/*
 * @Description: 
 * @Date: 2024-05-31 09:22:38
 * @LastEditTime: 2024-06-12 16:45:31
 */
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'

// 表单校验
export const rules = reactive({
  partyName: [required],
  partyCard: [required],
  applicant: [required],
  applicantPhone: [required],
  status: [required],
})

// CrudSchema https://doc.iocoder.cn/vue3/crud-schema/
const crudSchemas = reactive<CrudSchema[]>([
  // {
  //   label: '编号',
  //   field: 'id',
  //   isForm: false,
  // },
  {
    label: '用户名称',
    field: 'nowUser',
    isSearch: true
    
  },
  {
    label: '转派时间',
    field: 'createTime',
    isSearch: true,
    formatter: dateFormatter,
  }
  
])

export const { allSchemas } = useCrudSchemas(crudSchemas)
